package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_sly_pjt database table.
 * 
 */
@Entity
@Table(name="per_sly_pjt")
@NamedQuery(name="PerSlyPjt.findAll", query="SELECT p FROM PerSlyPjt p")
public class PerSlyPjt implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_SLY_PJT_PJTID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_SLY_PJT_PJTID_GENERATOR")
	private int pjtid;

	private String pjtidmrz;

	private String pjtname;

	private int pjtstat;

	//bi-directional many-to-one association to PerSlyTsx
	@OneToMany(mappedBy="perSlyPjt")
	private List<PerSlyTsx> perSlyTsxs;

	public PerSlyPjt() {
	}

	public int getPjtid() {
		return this.pjtid;
	}

	public void setPjtid(int pjtid) {
		this.pjtid = pjtid;
	}

	public String getPjtidmrz() {
		return this.pjtidmrz;
	}

	public void setPjtidmrz(String pjtidmrz) {
		this.pjtidmrz = pjtidmrz;
	}

	public String getPjtname() {
		return this.pjtname;
	}

	public void setPjtname(String pjtname) {
		this.pjtname = pjtname;
	}

	public int getPjtstat() {
		return this.pjtstat;
	}

	public void setPjtstat(int pjtstat) {
		this.pjtstat = pjtstat;
	}

	public List<PerSlyTsx> getPerSlyTsxs() {
		return this.perSlyTsxs;
	}

	public void setPerSlyTsxs(List<PerSlyTsx> perSlyTsxs) {
		this.perSlyTsxs = perSlyTsxs;
	}

	public PerSlyTsx addPerSlyTsx(PerSlyTsx perSlyTsx) {
		getPerSlyTsxs().add(perSlyTsx);
		perSlyTsx.setPerSlyPjt(this);

		return perSlyTsx;
	}

	public PerSlyTsx removePerSlyTsx(PerSlyTsx perSlyTsx) {
		getPerSlyTsxs().remove(perSlyTsx);
		perSlyTsx.setPerSlyPjt(null);

		return perSlyTsx;
	}

}